<div class="bg-light lter b-b wrapper-md">
    <div class="input-group col-sm-12 row">
        <label class="h2 col-sm-2" translate="strings.book.list.title"></label>
        <button class="btn btn-success btn-addon col-sm-1 m-r" ng-click="addBook()"><i class="fa fa-plus"></i>添加
        </button>
        <button class="btn btn-success btn-addon col-sm-2 m-r" ng-click="addBookFromNet()"><i class="fa fa-plus"></i>从网络添加
        </button>
    </div>

</div>
<div class="wrapper-sm">
    <div class="panel panel-default">

        <table class="table table-striped">
            <tr>
                <td class="" style="width:15%">
                    <input type="text" class="col-sm-2 form-control" placeholder="书籍名称" ng-model="query.text">
                </td>
                <td class="" style="width:15%">
                    <input type="text" class="col-sm-2 form-control" placeholder="isbn10" ng-model="query.isbn10">
                </td>
                <td class="" style="width:15%">
                    <input type="text" class="col-sm-2 form-control" placeholder="isbn13" ng-model="query.isbn13">
                </td>
                <td style="width:5%">
                    <div class="input-group text-center">
                        <button type="button" class="btn m-b-xs w-xs btn-info btn-rounded" ng-click="search(query)">
                            查询
                        </button>
                    </div>
                </td>
            </tr>
        </table>


        <div class="row wrapper">
            <div class="table-responsive">
                <table class="table table-striped b-t b-light">
                    <thead>
                    <tr>
                        <th style="width:5%">序号</th>
                        <th style="width:15%">书籍名称</th>
                        <th style="width:15%">书籍作者</th>
                        <th style="width:15%">创建时间</th>
                        <th style="width:5%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="book in response.data track by $index">
                        <td>{{$index + 1}}</td>
                        <td>{{book.title}}</td>
                        <td title="{{book.author.join(' ')}}">{{book.author.join(' ')}}</td>
                        <td>{{book.createTime | date: "yyyy-MM-dd"}}</td>
                        <td>
                            <a title="修改" class="fa fa-edit text-info text" ng-click="updateBook($index)"></a>
                            &nbsp;&nbsp;
                            <a title="删除" class="fa fa-times-circle text-danger text"
                               ng-click="delBook($index)"></a>
                        </td>
                    </tr>
                    </tbody>

                </table>
                <div class="text-center">
                    <pagination total-items="totalCount" direction-links="true" boundary-links="false" max-size="1"
                                ng-model="currentPage" class="m-t-none m-b" ng-change="pageChanged()"
                                previous-text="上一页" next-text="下一页"></pagination>
                </div>
            </div>
        </div>

    </div>
</div>
